gnss22 2.2.0
Loading...
Searching...
No Matches
gnss22


GNSS 22 Click

GNSS 22 Click demo application is developed using the NECTO Studio, ensuring compatibility with mikroSDK's open-source libraries and tools. Designed for plug-and-play implementation and testing, the demo is fully compatible with all development, starter, and mikromedia boards featuring a mikroBUS™ socket.


Click Library

  • Author : Stefan Filipovic
  • Date : Sep 2025.
  • Type : UART/I2C type

Software Support

Example Description

This example demonstrates the use of GNSS 22 Click by reading and displaying the GNSS coordinates.

Example Libraries

  • MikroSDK.Board
  • MikroSDK.Log
  • Click.GNSS22

Example Key Functions

  • gnss22_cfg_setup This function initializes Click configuration structure to initial values.
    void gnss22_cfg_setup(gnss22_cfg_t *cfg)
    GNSS 22 configuration object setup function.
    GNSS 22 Click configuration object.
    Definition gnss22.h:201
  • gnss22_init This function initializes all necessary pins and peripherals used for this Click board.
    err_t gnss22_init ( gnss22_t *ctx, gnss22_cfg_t *cfg );
    err_t gnss22_init(gnss22_t *ctx, gnss22_cfg_t *cfg)
    GNSS 22 initialization function.
    GNSS 22 Click context object.
    Definition gnss22.h:174
  • gnss22_reset_device This function resets the device by toggling the RST, STB, and FON pins.
    void gnss22_reset_device(gnss22_t *ctx)
    GNSS 22 reset device function.
  • gnss22_generic_read This function reads a desired number of data bytes by using the selected serial interface.
    err_t gnss22_generic_read ( gnss22_t *ctx, uint8_t *data_out, uint16_t len );
    err_t gnss22_generic_read(gnss22_t *ctx, uint8_t *data_out, uint16_t len)
    GNSS 22 data reading function.
  • gnss22_parse_gga This function parses the GGA data from the read response buffer.
    err_t gnss22_parse_gga ( uint8_t *rsp_buf, uint8_t gga_element, uint8_t *element_data );
    err_t gnss22_parse_gga(uint8_t *rsp_buf, uint8_t gga_element, uint8_t *element_data)
    GNSS 22 parse GGA function.

Application Init

Initializes the driver and logger.

void application_init ( void )
{
log_cfg_t log_cfg;
gnss22_cfg_t gnss22_cfg;
LOG_MAP_USB_UART( log_cfg );
log_init( &logger, &log_cfg );
log_info( &logger, " Application Init " );
// Click initialization.
gnss22_cfg_setup( &gnss22_cfg );
GNSS22_MAP_MIKROBUS( gnss22_cfg, MIKROBUS_1 );
if ( UART_ERROR == gnss22_init( &gnss22, &gnss22_cfg ) )
{
log_error( &logger, " Communication init." );
for ( ; ; );
}
log_info( &logger, " Application Task " );
}
#define GNSS22_MAP_MIKROBUS(cfg, mikrobus)
MikroBUS pin mapping.
Definition gnss22.h:137
void application_init(void)
Definition main.c:80

Application Task

Reads the received data, parses the NMEA GGA info from it, and once it receives the position fix it will start displaying the coordinates on the USB UART.

void application_task ( void )
{
if ( GNSS22_OK == gnss22_process( &gnss22 ) )
{
gnss22_parser_application( app_buf );
}
}
@ GNSS22_OK
Definition gnss22.h:231
void application_task(void)
Definition main.c:110

Application Output

This Click board can be interfaced and monitored in two ways:

  • Application Output - Use the "Application Output" window in Debug mode for real-time data monitoring. Set it up properly by following this tutorial.
  • UART Terminal - Monitor data via the UART Terminal using a USB to UART converter. For detailed instructions, check out this tutorial.

Additional Notes and Information

The complete application code and a ready-to-use project are available through the NECTO Studio Package Manager for direct installation in the NECTO Studio. The application code can also be found on the MIKROE GitHub account.